package com.huitone.smspfm.oldclient.app;

import com.bin.common.utils.StringUtils;

public enum SmsSourceType {
	
	FILE("file","文件"),
	DB("db","数据库")
	;
	
	String source;
	String desc;

	SmsSourceType(String source,String desc){
		this.source = source;
		this.desc = desc;
	}
	
	public static SmsSourceType valueOfSource(String source){
		if (StringUtils.isEmpty(source)){
			return null;
		}
		for (SmsSourceType smsSourceType : values()){
			if (source.equalsIgnoreCase(smsSourceType.source)){
				return smsSourceType;
			}
		}
		return null;
	}
}
